<script src="js/jquery.tools.min.js"></script>
<link rel="stylesheet" href="css/search.css" type="text/css" />
<link rel="stylesheet" href="css/common.css" type="text/css" />
<?php
/*
 * Created on Feb 23, 2010
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
?>
<?php 
	$projects = $infoModel->getItemsContentTypeById(PROJECT_ID, null, MAX_RECORD_LAST_PROJECT);
	 
?>
<div id="mainClm">
	<div class="box">
		<div class="last-new">
			<h2>DỰ ÁN NỔI BẬT</h2>
		</div>
		<div id="iconListWrap">
			<a class="prevPage browse left"></a>  
			<div class="scrollable" id=infinite>	
				<!-- root element for the items -->
				<ul class="items" id="iconList">
				<?php while ($row = $infoModel->getArrayNameInfos($projects)) {  
					 	$imageFileName = 'img/upload/content/'.$row["image"]; 
				 	  	if ($row["image"] && file_exists($imageFileName)) { 
				 	  		$imgTag = '<img src="'.$imageFileName.'" alt="" height="80" width="80" />';
				 	  	} else {
				 	  		$imgTag = '<img alt="" src="img/NoPhotoAvailable.jpg" height="80" width="80" />';
				 	  	} ?>
				 	  	
					<li class="btnLabel_s"><?php echo $imgTag; ?><a href="itemdetail.php?itemdetailid=<?php echo $row['id'] ?>"><?php echo $row['title']; ?></a></li>
				<?php } ?>
				</ul>
			</div> 
			<a class="nextPage browse right"></a>
		</div> 
</div>
 
<script>
$(document).ready(function() {
	$("#infinite").scrollable({size:4, item:'li'});	
});
</script>
